package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MainPointStudyResult generated by hbm2java
 */
@Entity
@Table(name = "main_point_study_result")
public class MainPointStudyResult implements java.io.Serializable {

	private Long id;
	private MainPoint mainPoint;
	private Topic topic;
	private UserBaseInfo userBaseInfo;
	private Boolean examResult;
	private Date createTime;
	private int studyNum;

	public MainPointStudyResult() {
	}

	public MainPointStudyResult(MainPoint mainPoint, Topic topic,
			UserBaseInfo userBaseInfo, Date createTime, int studyNum) {
		this.mainPoint = mainPoint;
		this.topic = topic;
		this.userBaseInfo = userBaseInfo;
		this.createTime = createTime;
		this.studyNum = studyNum;
	}

	public MainPointStudyResult(MainPoint mainPoint, Topic topic,
			UserBaseInfo userBaseInfo, Boolean examResult, Date createTime,
			int studyNum) {
		this.mainPoint = mainPoint;
		this.topic = topic;
		this.userBaseInfo = userBaseInfo;
		this.examResult = examResult;
		this.createTime = createTime;
		this.studyNum = studyNum;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAIN_POINT_ID", nullable = false)
	public MainPoint getMainPoint() {
		return this.mainPoint;
	}

	public void setMainPoint(MainPoint mainPoint) {
		this.mainPoint = mainPoint;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TOPIC_ID", nullable = false)
	public Topic getTopic() {
		return this.topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENT_ID", nullable = false)
	public UserBaseInfo getUserBaseInfo() {
		return this.userBaseInfo;
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
	}

	@Column(name = "EXAM_RESULT")
	public Boolean getExamResult() {
		return this.examResult;
	}

	public void setExamResult(Boolean examResult) {
		this.examResult = examResult;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "STUDY_NUM", nullable = false)
	public int getStudyNum() {
		return this.studyNum;
	}

	public void setStudyNum(int studyNum) {
		this.studyNum = studyNum;
	}

}
